<?php
namespace app\admin\model;
use think\Model;

class Order extends Model
{
    public function searchKeywordsAttr($q,$v)
    {
        $q->where('brand_name','like',"%{$v}%");
    }
    public function searchCidAttr($q,$v)
    {
        $q->where('status','=',$v);
    }
    public static function getOrderList($where)
    {
   return    $list =  Order::withSearch(array_keys($where),$where)
                       ->alias('a')
                       ->leftJoin("ecm_order_status b",'a.status=b.status_id')
                       ->paginate([
                       'list_rows'=>4,
                       'query'=>$where
                   ]);

    }
}